<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title><spring:message code="message.lable.compgroupSTDdetail"/></title>
  
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %> 
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">

    div.col-sm-1.text-left,div.col-sm-2.text-left, div.col-sm-3.text-left, div.col-sm-10.text-left{
    color:#949494;
    }	
    </style>
    
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1><spring:message code="message.lable.compgroupSTDdetail"/></h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.StdManage"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.compgroupStd"/></a></li>
        </ol>
    </section>
 <section class="content"> 
    <table class="infoBox">
      <tr>
        <td width="150px" class="infoBoxleft">
        <p style="color:#fff;font-size:20px;text-align:center;font-weight:600"><spring:message code="message.listForm.jiTuan"/><spring:message code="message.listForm.xinXi"/></p>
        </td>
        <td>
        	<form role="form" class="form-horizontal" action="${ctx }/stdDrug/editInfo.html" method="post">
                <div class="box-body">
                    <div class="form-group form-group-xs margintop-xs"  style="margin-top:5px;">
                        <label class="col-sm-2 text-right"><spring:message code="message.listForm.jiTuan"/><spring:message code="message.lable.status"/>：</label>
                        <div class="col-sm-2 text-left">
                       ${compGroup.status==1?"启用":"停用"}
                        </div>
                         <label class="col-sm-1 text-right margintop-xs"><spring:message code="message.listForm.jiTuanBianMa"/>：</label>
                        <div class="col-sm-3 text-left">
                           ${compGroup.compGroupCode}
                        </div>
                         <label class="col-sm-1 text-right margintop-xs"><spring:message code="message.listForm.jiTuanMingCheng"/>：</label>
                        <div class="col-sm-2 text-left">
                           ${compGroup.compGroupName}
                        </div>
                    </div>
                    <div class="form-group form-group-xs" style="margin-top:-10px">
                         <label class="col-sm-2 text-right margintop-xs"><spring:message code="message.listForm.jiTuanMingCheng"/><spring:message code="message.listForm.pinYinMa"/>：</label>
                        <div class="col-sm-2 text-left">
                           ${compGroup.compGroupSpelName}
                        </div>
                        <label class="col-sm-1 text-right margintop-xs"><spring:message code="message.listForm.jiTuanJianCheng"/>：</label>
                        <div class="col-sm-2 text-left">
                             ${compGroup.compGroupShortname}
                        </div>
                        <label class="col-sm-2 text-right margintop-xs"><spring:message code="message.listForm.JianChengpinYin"/>：</label>
                        <div class="col-sm-1 text-left">
                           ${compGroup.compShortSpelCode}
                        </div>
                    </div>
                      
                   
                   <div class="form-group form-group-xs" style="margin-top:-10px;margin-bottom:-10px;">
                        <label class="col-sm-2 text-right margintop-xs" ><spring:message code="message.lable.remark"/>：</label>
                        <div class="col-sm-10 text-left">
                            ${compGroup.remark }
                        </div>
                    </div>
                </div>
             </form>
        </td>
      </tr>
      </table>
  
  
 

        <table class="jqgrid" id="gridlist"></table>
         <div id="gridpage"></div>
         
        <div class=" box box-warning bottongroup">
             <label id="allOk" class="btn btn-default btn-sm" onclick='location="compGroupList.html"'><spring:message code="message.button.getBackSpacing"/></label>
        </div>
 
        
    </section>
     <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "querystdCompGroupSubCJson.html",
                mtype: "post",
                datatype: "json",
                postData: {"tid" : "${compGroup.compGroupId}"},
                autowidth: true,
                height: 270,
                colNames: ['id',
                           '<spring:message code="message.listForm.qiYeBianMa"/>',
                           '<spring:message code="message.listForm.qiYeMingCheng"/>',
                           '<spring:message code="message.listForm.qiYeShuXing"/>',
                           '<spring:message code="message.listForm.zuZhiJiGouDaiMa"/>',
                           '<spring:message code="message.listForm.suoShuDiQu"/>', 
                           '<spring:message code="message.listForm.qiYeZhuCeLeiXing"/>',
                           '<spring:message code="message.lable.status"/>'
                           ],
                colModel: [
                            { name: 'compId', width: 100,align:"center" ,hidden:true,sortable: false},
                            { name: 'compCode', width: 100,align:"center" ,sortable: false},
                            { name: 'compName', width: 130,align:"center",sortable: false,
                            	 formatter:function(val, opts,row) {
            		     			 return "<a href=\"javascript:$.HN.dialog.opendialog('"+row.compId+"','"+val+"','${ctx}/stdCompinfo/toStdCompinfoDetail.html?compId="+row.compId+"','800px','400px','operResult')\">"+val+"</a>";
            		     		}	
                            },
                            { name: 'compType', width: 60,align:"center",sortable: false ,
                            	formatter:function(val){
                            		return val==1?"生产企业":(val==2?"配送企业":"其他");
                            	}
                            },
                            { name: 'orgCode', width: 60,align:"center",sortable: false },
                            { name: 'arFullname', width: 60,align:"center",sortable: false },
                            { name: 'compRegName', width: 60,align:"center",sortable: false },
                            { name: 'status', width: 40,align:"center",sortable: false,
                            	cellattr:function (rowId, val, rawObject, cm) {
                                    if(val == '停用'){
                                        return 'style="color:red"';
                                    }
                                },
                                formatter : function(val, opts, rowdata) {
                                    var str = "";
                                    if(rowdata.status == 1){
                                        str="<spring:message code="message.button.start"/>";
                                    }
                                    if(rowdata.status == 2){
                                        str="<spring:message code="message.button.stop"/>";
                                    }
                                    if(rowdata.status == 3){
                                        str="<spring:message code="message.button.combine"/>";
                                    }
                                    return str;
                                }
                            }
                ],
                rowNum: 20,
                rowList: [1, 20, 30,50,100],
                rownumbers: true,
                pager: "#gridpage",
                multiselect: false, 
                viewrecords: true,
                gridComplete: function(){
                	var page = $("#gridlist").jqGrid('getGridParam','page');
            		var rows = $('#gridlist').getGridParam("rowNum");
            		var maxnum = (rows*page).toString();
            		var len = (maxnum.length)*10;
            		$('.jqgfirstrow').find('td').eq(0).css('width',len+'px');
                	$('#gridlist_rn').css('width',len+'px');
                },
                caption: "<spring:message code="message.listForm.xiangQingLieBiao"/> ",
                jsonReader: {
                    repeatitems: false,
                    id: "compId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
            
        })
        
        
    </script>
</body>
</html>


 